package com.project.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RequestMapping("ajax")
public class AjaxController {

    @RequestMapping("checkName")
    @ResponseBody
    public String checkName(String name){
        if ("java".equals(name)){
            return "yes";
        }
        return "no";
    }

    @RequestMapping("update")
    @ResponseBody
    public String update(){

//        return "/html/update.html";
        return "2";
    }
}
